import { dwHttp } from '@/utils/http';

//获取参数分类列表
export const getParameterCategoryList = () => {
  return dwHttp({
    method: 'get',
    isSuccessTip: false,
    url: '/admin-api/sys/parameter/category/list',
  });
};
export const getParameterComponentList = (categoryCode: string) => {
  return dwHttp({
    method: 'get',
    isSuccessTip: false,
    params: { categoryCode: categoryCode },
    url: '/admin-api/sys/parameter/component/list',
  });
};

export const getParameterValueJson = (categoryCode: string) => {
  return dwHttp({
    method: 'get',
    isSuccessTip: false,
    params: { categoryCode: categoryCode },
    url: '/admin-api/sys/parameter/value/json',
  });
};
export const save = (data: Record<string, object>) => {
  return dwHttp({
    method: 'post',
    isSuccessTip: true,
    data: data,
    url: '/admin-api/sys/parameter/value/save',
  });
};
